package com.example.controller;


import com.example.domain.Account;
import com.example.pojo.AccountY;
import com.example.service.IAccountYSerivce;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.Map;

@CrossOrigin
@RestController
public class AccountYController {
//    注入业务层接口
    @Resource
    private IAccountYSerivce accountYSerivce;

//    登录
    @RequestMapping("/loginY")
    public Map<String,Object> loginY(AccountY accountY){
        return accountYSerivce.loginY(accountY);
    }

//    查询运营账户
    @RequestMapping("/getAccountY")
    public Map<String,Object> getAccountY(AccountY accountY){
        return accountYSerivce.getAccountY(accountY);
    }

//    添加
    @RequestMapping("/addAccountY")
    public Map<String,Object> addAccountY(AccountY accountY){
        return accountYSerivce.addAccountY(accountY);
    }

//    删除
    @RequestMapping("/delAccountY")
    public Map<String,Object> delAccountY(AccountY accountY){
        return accountYSerivce.delAccountY(accountY);
    }

//    更新
    @RequestMapping("/modifyAccountY")
    public Map<String,Object> modifyAccountY(AccountY accountY){
        return accountYSerivce.modifyAccountY(accountY);
    }
}
